From 8753bc456e7791b8f4c6c20f46488d11870c5f50 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Mon, 30 Aug 2010 13:58:07 +0100 Subject: [PATCH] libxl: fix xenstore connection when run in domU When used in a domain other than the one running xenstore, libxl_ctx_init will fail to connect even when xenstore is actually available. Add a call to xs_domain_open to handle this case. Signed-off-by: Daniel De Graaf Signed-off-by: Stefano Stabellini committer: Stefano Stabellini --- tools/libxl/libxl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 099d82e7e9..4976415333 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -54,6 +54,8 @@ int libxl_ctx_init(libxl_ctx *ctx, int version, xentoollog_logger *lg) } ctx->xsh = xs_daemon_open(); + if (!ctx->xsh) + ctx->xsh = xs_domain_open(); if (!ctx->xsh) { XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, errno, "cannot connect to xenstore"); -- 2.30.2